package com.fwlst.module_home.config

import androidx.compose.runtime.Composable
import com.fwlst.module_home.R
import com.fwlst.module_home.screen.HomeScreen
import com.fwlst.module_home.screen.ProfileScreen
import com.fwlst.module_home.screen.Tab1Screen
import com.fwlst.module_home.screen.Tab2Screen

data class TabConfig(
    val route: String,
    val title: String,
    val visible: Boolean = true,
    val selectedIcon: Int,
    val unselectedIcon: Int,
    val statusColor: Long,
    val screen: @Composable () -> Unit
) {
    companion object {
        val HOME = TabConfig(
            route = "home",
            title = "首页",
            selectedIcon = R.drawable.home_nav_bt1_1,
            unselectedIcon = R.drawable.home_nav_bt1_0,
            statusColor = 0xFFFFFFFF,
            screen = { HomeScreen() })

        val TAB1 = TabConfig(
            route = "tab1",
            title = "TAB1",
            selectedIcon = R.drawable.home_nav_bt2_1,
            unselectedIcon = R.drawable.home_nav_bt2_0,
            statusColor = 0xFFFFFFFF,
            screen = { Tab1Screen() })

        val TAB2 = TabConfig(
            route = "tab2",
            title = "TAB2",
            selectedIcon = R.drawable.home_nav_bt3_1,
            unselectedIcon = R.drawable.home_nav_bt3_0,
            statusColor = 0xFFFFFFFF,
            screen = { Tab2Screen() })

        val PROFILE = TabConfig(
            route = "profile",
            title = "我的",
            selectedIcon = R.drawable.home_nav_bt4_1,
            unselectedIcon = R.drawable.home_nav_bt4_0,
            statusColor = 0xFFE8FCE7,
            screen = { ProfileScreen() })

        // 新增默认配置集合
        val DEFAULT_TABS by lazy {
            listOf(HOME, TAB1, TAB2, PROFILE)
        }
    }
}